]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Disconnect signals when resetting notification
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 29 Jan 2019 14:30:40 +0000 (15:30 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 29 Jan 2019 16:49:48 +0000 (16:49 +0000)
Just like we did for the parent class in commit b57832716a, we should
disconnect any notification signals when the notification is reset
to null to avoid warnings later.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/942

js/ui/messageTray.js

index 0fd739834ae4126ef2a25570db8a743c13cfdb40..97452275fd1ecaa3b37d93bcc7af633c447f1a61 100644 (file)
@@ -497,9 +497,12 @@ class NotificationBanner extends Calendar.NotificationMessage {
         });
     }
 
-    _onDestroy() {
-        super._onDestroy();
-        this.notification.disconnect(this._activatedId);
+    _disconnectNotificationSignals() {
+        super._disconnectNotificationSignals();
+
+        if (this._activatedId)
+            this.notification.disconnect(this._activatedId);
+        this._activatedId = 0;
     }
 
     _onUpdated(n, clear) {